using UnityEngine;
using System.Collections;

[System.Serializable]
public class ThrowHealObj : CharacterAction{	
	private GameObject throwedObjPrefab;
	public GameObject resurrectionPrefab;
	
	public void TakeEffectOnTarget(Transform target)
	{
		Character character = target.GetComponent<Character>();
		character.Property.hp.Value += character.Property.hpRecovery;
		character.Property.hp.Value = Mathf.Clamp(character.Property.hp,0,character.Property.hpMax);
		GameObject resurrection = (GameObject)Instantiate(resurrectionPrefab);
		resurrection.transform.position = character.transform.position;
	}
}
